package com.zzj.ecology.admin.controller.minitor;

import com.zzj.ecology.admin.controller.BaseController;
import com.zzj.ecology.common.constant.LogConstants;
import com.zzj.ecology.system.bean.vo.HttpResult;
import com.zzj.ecology.system.service.minitor.SysUserOnlineService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName SysUserOnlineController
 * @Description TODO
 * @Author zhijun zeng at 11:23 2020/5/23
 * @Version 1.0
 **/
@RestController
@Api(value = "SysUserOnline", description = "SysUserOnline 服务器硬件信息")
public class SysUserOnlineController extends BaseController {

    @Autowired
    private SysUserOnlineService sysUserOnlineService;

    @RequestMapping(value = "/ajax/admin/sysUserOnline/sessions", method = RequestMethod.GET)
    public HttpResult onlineSessions() {
        return success().add(sysUserOnlineService.findSessionsByStatus(LogConstants.OnlineLog.STATUS_ONLINE));
    }

}
